﻿Imports Common

Public Class PlayerParser

    Public Shared Function [Get](playerData As tblUser) As playerDTO
        Dim PlayerDTO As New playerDTO

        If playerData Is Nothing Then
            Return New playerDTO
        End If

        With playerDTO
            .Alias = playerData.strAlias
            .ID = playerData.intUserID
            .LastConnected = playerData.dtmLastConnection
            .LastIPUsed = playerData.strLastIP
            .LastUpdated = playerData.dtmDateUpdated
            .PermissionLevel = playerData.intUserFlag
            .RoomID = playerData.intRoom
            .SelectedCharSlot = playerData.intCharSlot
        End With

        Return playerDTO
    End Function
End Class
